<script setup lang="ts">
import { renderIcon, renderCustomIcon, type IconProps, IconTypeEnum } from '@/utils'

const props = withDefaults(defineProps<IconProps>(), {
  size: 14,
  type: IconTypeEnum.iconify
})

const iconCom = computed(() => (props.type === IconTypeEnum.iconify ? renderIcon(props) : renderCustomIcon(props)))
</script>

<template>
  <component :is="iconCom" />
</template>
